package com.company.project.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.company.project.pojo.contradiction.Contradiction;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.project.pojo.contradiction.ContradictionDTO;
import com.company.project.pojo.roleVillage.RoleVillageDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 矛盾 Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2019-08-09
 */
@Mapper
public interface ContradictionMapper extends BaseMapper<Contradiction> {

    /**获取矛盾资料列表*/
    IPage<ContradictionDTO> getContradictionList(Page page, @Param("keyword") String keyword, @Param("status") Integer status, @Param("isPush") Integer isPush, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**查询推送给单位的矛盾资料*/
    IPage<ContradictionDTO> getContradictionListByHandleInstitutionId(Page page, @Param("roleVillageDTOList") List<RoleVillageDTO> roleVillageDTOList, @Param("institutionId") Integer institutionId, @Param("roleId") Integer roleId, @Param("status")Integer status);
    /**根据角色id查询矛盾资料*/
    IPage<ContradictionDTO> getContradictionListByRoleId(Page page, @Param("roleVillageDTOList") List<RoleVillageDTO> roleVillageDTOList, @Param("institutionId") Integer institutionId, @Param("roleId") Integer roleId, @Param("status")Integer status, @Param("startTime") String startTime, @Param("endTime")String endTime);
    /**获取管理区统计*/
    List<ContradictionDTO> getManagementzoneStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime);
    /**获取职能部门统计*/
    List<ContradictionDTO> getDepartmentsStatistics(@Param("institutionId") Integer institutionId, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**根据管理区获取村庄统计*/
    List<ContradictionDTO> getVillageStatistics(@Param("institutionId") Integer institutionId, @Param("villageId") Integer villageId, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**查询待提交的矛盾资料*/
    IPage<ContradictionDTO> getToBeSubmittedContradictionList(Page page, @Param("user_id") Integer user_id);
    /**获取登录人提交的矛盾资料列表*/
    IPage<ContradictionDTO> getContradictionListPageByInputUserId(Page page, @Param("user_id") Integer user_id, @Param("status") Integer status, @Param("startTime") String startTime, @Param("endTime") String endTime);

}
